<template>
	<div @click.stop="onClickHandler()"
		:class="[selected ?'row-selected-state ' : 'row-normal-state ']" style="position: relative;">
		<i class="el-icon-rank drag-widget" style="position: absolute;left: 0px;top:0px;z-index: 100;" v-show="selected"></i>
		<el-tabs v-model="activeName">
			<el-tab-pane label="工作流进度" name="wkfActivity">
				<el-table size="mini" stripe border show-overflow-tooltip="true" style="width: 100%">
					<el-table-column label="活动名称">
					</el-table-column>
					<el-table-column label="创建人">
					</el-table-column>
					<el-table-column label="开始时间">
					</el-table-column>
					<el-table-column label="结束时间">
					</el-table-column>
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="工作流意见" name="wkfComment">
				<el-table size="mini" stripe border show-overflow-tooltip="true" style="width: 100%">
					<el-table-column label="创建人">
					</el-table-column>
					<el-table-column label="意见">
					</el-table-column>
				</el-table>
			</el-tab-pane>
		</el-tabs>
	</div>
</template>

<script>
	import utils from '@/utils/utils.js';
	import formDesignerUtil from '@/utils/formDesignerUtil.js';
	export default {
		name: "DesignerWorkflowStepsComponent",
		props: [
			"componentModel"
		],
		data() {
			return {
				selected: false,
				"propertySet": [{
					"key": "ID",
					"label": "ID",
					"editor": "label"
				}],
				"currentComponentModel": this.componentModel,
				activeName: "wkfActivity"
			}
		},
		inject: ['children'],
		mounted() {
			this.children.push(this);
		},beforeUnmount() {
			utils.removeArrayElement(this.children,this);
		},
		methods: {
			onClickHandler() {
				formDesignerUtil.componentClickHandler(this);
			},
			setSelected(selected) {
				this.selected = selected;
			},
			getPropertyValue(propertyKey) {
				if(propertyKey=="ID"){
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"id");
				}
				return formDesignerUtil.getComponentModelCommonValue(this.componentModel,propertyKey);
			},
			setPropertyValue(propertyKey, propertyValue) {
				formDesignerUtil.setComponentModelCommonValue(this.componentModel,propertyKey, propertyValue);
			}
		}
	}
</script>

<style>
</style>
